package cn.zs.supply.common.utils;


import javax.servlet.http.HttpServletRequest;

public class RequestHolder {

    private static final ThreadLocal<String> assurerNoHolder = new ThreadLocal<String>();

    private static final ThreadLocal<HttpServletRequest> requestHolder = new ThreadLocal<HttpServletRequest>();

    public static void add(String assurerNo) {
    	assurerNoHolder.set(assurerNo);
    }

    public static void add(HttpServletRequest request) {
        requestHolder.set(request);
    }

    public static String getCurrentAssurerNo() {
        return assurerNoHolder.get();
    }

    public static HttpServletRequest getCurrentRequest() {
        return requestHolder.get();
    }

    public static void remove() {
    	assurerNoHolder.remove();
        requestHolder.remove();
    }
}
